load("//eden/scm:targets.bzl", "rust_python_library")

oncall("sapling")

rust_python_library(
    name = "pyworkingcopyclient",
    srcs = glob(["src/**/*.rs"]),
    autocargo = {"cargo_toml_config": {
        "dependencies_override": {"dependencies": {"sapling-edenfs-client": {"optional": True}}},
        "features": {
            "default": [],
            "eden": ["sapling-edenfs-client"],
        },
    }},
    crate_root = "src/lib.rs",
    features = ["eden"],
    deps = [
        "//eden/scm/lib/cpython-ext:cpython-ext",
        "//eden/scm/lib/edenfs-client:edenfs-client",
        "//eden/scm/lib/types:types",
        "//eden/scm/lib/workingcopy:workingcopy",
    ],
)
